<?php

namespace app\index\controller;

use app\BaseController;
use app\model\FriendLink;
use app\model\Image;

class Index extends BaseController
{
    function index(): string
    {
        $friendLink = FriendLink::select()->toArray();
        $this->assign('friendLink', $friendLink);
        $num = Image::cache("num", 300)->count();
        $this->assign('num', $num);
        return $this->fetch("index/index", ['footer' => true, "index" => true]);
    }

    function permission(): string
    {
        return $this->fetch("/401");
    }

    function userAgreement(): string
    {
        return $this->fetch("index/userAgreement", ['title' => '用户协议与隐私条款']);
    }
}
